package 装饰模式.demo;

/**
 * @author zyl
 * @Description
 * @since 2023/12/27 12:52
 */

public class Test {
    public static void main(String[] args) {
        ConcreteComponent concreteComponent = new ConcreteComponent();
        ConcreteDecoratorA ca = new ConcreteDecoratorA();
        ConcreteDecoratorB cb = new ConcreteDecoratorB();
//        concreteComponent.Operation();
        System.out.println("******************************");
        ca.SetComponent(concreteComponent);
//        ca.Operation();
        System.out.println("******************************");
        cb.SetComponent(ca);
        cb.Operation();
    }
}

